package com.chen.demo.cas.entity;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;
@Data
@Accessors(chain = true)
public class RolePerms implements GrantedAuthority {
//    可参考SimpleGrantedAuthority
    private String id;
//    例如：ROLE_ADMIN
    private String roleCode;

    private List<Perms>perms;
    @Override
    public String getAuthority() {
        return roleCode;
    }
}
